package plus.xj17520.org.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * @projectName: Pethome5-6
 * @package: plus.xj17520.org.domain
 * @className: Department
 * @author: XiaoJue
 * @description: TODO
 * @date: 2022/5/6 17:39
 * @version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_department")
@ApiModel(description = "部门实体类对象")
public class Department extends BaseDomain{
    @Id
    @ApiModelProperty(value = "部门对象的主键")
    private Long id;

    // 部门编号
    @ApiModelProperty(value = "部门对象的编号")
    private String sn;

    @ApiModelProperty(value = "部门对象的姓名")
    private String name;

    // 状态 0正常 1禁用
    @ApiModelProperty(value = "部门对象的状态:1正常，0禁用")
    private Integer state;

    // 关联的employeeid,部门管理员，关联Employee表id
    @ApiModelProperty(value = "部门对象关联的员工表ID")
    private Long managerId;

    // 自关联自己的上一级id
    @ApiModelProperty(value = "部门对象的关联的上级ID")
    private Long parentId;

    // 部门级联路径
    @ApiModelProperty(value = "部门对象的级联路径")
    private String dirPath;

    // 部门的del,默认值是1,表示未删除,删除,0
    @ApiModelProperty(value = "部门的del:默认值是1,表示未删除,删除,0")
    private Integer del;

    @Transient
    private String managerName;

    @Transient
    private String parentName;
}
